﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace mds.Queue.MSMQClient
{
    /// <summary>
    /// 消息队列中日志类型
    /// </summary>
    public enum MsmqLogType
    {
        /// <summary>
        /// 常规访问日志
        /// </summary>
        Opt = 1,
        /// <summary>
        /// 异常日志
        /// </summary>
        Error = 2
    }
    /// <summary>
    /// 日志消息队列数据实体
    /// </summary>
    [Serializable]
    public class MsmqLogEntity : MarshalByRefObject
    {
        private MsmqLogType logType; //日志类型
        private byte[] msgData; //日志数据

        /// <summary>
        /// 构造函数
        /// </summary>
        public MsmqLogEntity()
        {

        }

        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="logType">日志类型</param>
        /// <param name="msgData">日志数据</param>
        public MsmqLogEntity(MsmqLogType logType, byte[] msgData)
        {
            this.logType = logType;
            this.msgData = msgData;
        }

        /// <summary>
        /// 日志类型
        /// </summary>
        public MsmqLogType LogType
        {
            get { return logType; }
            set { logType = value; }
        }

        /// <summary>
        /// 日志数据
        /// </summary>
        public byte[] MsgData
        {
            get { return msgData; }
            set { msgData = value; }
        }
    }
}
